﻿<%template _header%>
<link rel="stylesheet" type="text/css" href="/support/common/vss.css">
<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>

<script type="text/javascript">
    function ChangeDetailStatus()
    {
        if( _$('detail').style.display == 'none')
        {
            _$('detail').style.display = '' ;
            _$('changeDetail').innerText = '关闭详情' ;
        }
        else
        {
            _$('detail').style.display = 'none';
            _$('changeDetail').innerText = '查看详情' ;
        }
    }
</script>

<div class="layout-cols2">
	
	<div class="col1">
		
		<div class="box">
			<div class="caption">
				症状名称
			</div>
			<div class="content">
				{SymptomData.Name}
			</div>
		</div>
		
		<div class="box">
			<div class="caption">
				症状简介
			</div>
			<div class="content">
				{SymptomData.Intro}
				<%csharp%>if(SymptomData.Desp.Length > 0) { <%/csharp%>
				   <div style=" float:right;"><a id="changeDetail" href="javascript:ChangeDetailStatus();" class="yellowbutton">查看详情</a></div> 
				<%csharp%> } <%/csharp%>
				<div style="clear:both;"></div>
			</div>
		</div>
		
		<div id="detail" class="box" style="display:none">
			<div class="caption">
				症状描述
			</div>
			<div class="content">
			
				{SymptomData.Desp}
				<div style=" float:right;"><a href="javascript:ChangeDetailStatus();" class="yellowbutton">关闭详情</a></div>
				<div style="clear:both;"></div>
			</div>
		</div>
        <div class="box">
			<div class="caption">
				症状程度统计
			</div>
			    <br /><br />
			    <div id="Severities" style="width:400px;height:300"><img src="/support/alpha/images/indicator_medium.gif" /><b>正在加载……</b></div>
			    <b>&nbsp;&nbsp;注：饼状图中数字为患该病人数比列，点击症状程度人数可以显示其病人列表</b>（统计数据以前一天为准）
		</div>
		
        <div class="box">
			<div class="caption">
				症状在疾病中的分布统计
			</div>
			<div>
			    <br />
			    <div id="disease" style="width:700px;height:370px;overflow:auto"><img src="/support/alpha/images/indicator_medium.gif" /><b>正在加载……</b></div>
			    <b>&nbsp;&nbsp;注：柱状图上方数字为服用该剂量人数，点击可以显示其病人列表</b>（统计数据以前一天为准）
			</div>
		</div>

	</div>
	
	<div class="col2">
		<%template _AddSymptom%>
		<br />
		<%template _DiseaseRelatedForSymptom%>
		<br />
		<%template _PatientRelatedForSymptom%>
		<br />
		<%template _TopicHottestForSymptom%>
		
	</div>
	
</div>
<script type="text/javascript" src="/support/common/vss.js"></script>

<script type="text/javascript">
function loadJs()
{
	var id = getURLParam("id", location.href);
	
	var url = "/support/data/symptom_stat/symptom_stat_"+id+".js";
	var o = new GetJs(url,load,load);
	o.init();
}
function load()
{
   var id = getURLParam("id", location.href);
   var data = [] ;
   for(var i=0;i< stat_radio.length;++i) data[i] = {name:stat_radio[i][0]+":"+stat_radio[i][1]+"人", value:stat_radio[i][1], href:"/Pages/Alpha/PatientList.aspx?symid="+id+"&symptomdegree="+stat_radio[i][2]};
	vmlss({
		element:document.getElementById("Severities"),//这个是绘图时图形放置的容器，可选
		data:data,//数据
		type:"picchart",//cylinder_h表示画饼图份
		title:'',//这个是表的标题，可选
		width:300,//这个是整个图的宽度
		height:300//这个是整个图的高度
	}).draw();
    var data1=[];
    var width = 100*treatment_stat.length ; 
    width = width < 600 ? 600 : width ;
    for(var i=0;i< treatment_stat.length;++i) data1[i] = {name:treatment_stat[i][0], value:treatment_stat[i][1],href:"/Pages/Alpha/PatientList.aspx?symid="+id+"&dszid="+treatment_stat[i][2]+"&isquerycurrent=1"};
    if (data1.length == 0 )
    {
        data1[0] = {name:"", value:0};
    }
    vmlss({
	    element:document.getElementById("disease"),//这个是绘图时图形放置的容器，可选
	    data:data1,//数据
	    type:"cylinder_h",//cylinder_h表示画柱状图
	    calnum:25,//这个表示把竖坐标的刻度划分成25份
	    title:'',//这个是图表的标题，可选
	    width:width,//这个是整个图的宽度
	    height:350,//这个是整个图的高度
	    vLabel:"<b>疾病</b>",//这个是水平坐标的名称，可选
	    hLabel:"<b>分布人数</b>"//这个是垂直坐标的名称，可选
    }).draw();
}
loadJs();
</script>

<%template _footer%>		
